<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>京乳时鲜后台管理系统</title>
    <meta name="description" content="MilkLogisticsSystem">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <link rel="stylesheet" href="/static/assets/css/normalize.css">
    <link rel="stylesheet" href="/static/assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/assets/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/assets/css/themify-icons.css">
    <link rel="stylesheet" href="/static/assets/css/pe-icon-7-filled.css">
    <link rel="stylesheet" href="/static/assets/css/flag-icon.min.css">
    <link rel="stylesheet" href="/static/assets/css/cs-skin-elastic.css">
    <link rel="stylesheet" href="/static/assets/css/style.css">

    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800' rel='stylesheet' type='text/css'>

    <!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv.min.js"></script> -->
</head>
<body style="background-image: url('/static/images/background2.jpg');background-size: cover;background-repeat: no-repeat">

    <div class="sufee-login d-flex align-content-center flex-wrap">
        <div class="container">
            <div class="login-content" style="padding-top: 15%">
                <div class="login-form">
                    <form id="form" method="post" enctype="multipart/form-data">
                        {% csrf_token %}
                        <div class="form-group">
                            <label>用户名</label>
                            <input type="text" class="form-control" name="username" id="username" placeholder="用户名" required="required">
                        </div>
                        <div class="form-group">
                            <label>密码</label>
                            <input type="password" class="form-control" name="password" id="password" placeholder="密码" required="required">
                        </div>
                        <span id="login_warning" style="color: red;font-size: 15px;display:none;">用户名或密码错误！</span>

                        <div class="checkbox">
                            <label>
                                <input type="checkbox" name="remember"> 记住我
                            </label>
                            <label class="pull-right">
                                <a href="javascript:alert('请联系管理员！')">忘记密码?</a>
                            </label>

                        </div>
                        <button type="submit" class="btn btn-success btn-flat m-b-30 m-t-30">登录</button>
                        <div class="register-link m-t-15 text-center">
                            <p style="margin-bottom: 0px;margin-top: 16px">没有账户？ <a href="{% url 'register' %}">点这里注册</a></p>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <script src="/static/assets/js/vendor/jquery-2.1.4.min.js"></script>
    <script src="/static/assets/js/popper.min.js"></script>
    <script src="/static/assets/js/bootstrap.min.js"></script>
    <script src="/static/assets/js/jquery.matchHeight.min.js"></script>
    <script src="/static/assets/js/main.js"></script>

    <script type="text/javascript">
        {% if result == "fail" %}
            jQuery(document).ready(function ($) {
                $("#login_warning").show();
                setTimeout(function () {
                    $("#login_warning").hide();
                },3000)
            });
        {% endif %}
    </script>

</body>
</html>
